;;;Place a Magnetic North Symbol (block) in the drawing at any orientation.
;;;(uses UPOINT)
;;;
;;;	AUTHOR: HENRY C. FRANCIS
;;;		425 N. ASHE ST.
;;;		SOUTHERN PINES, NC 28387
;;;		All rights reserved without prejudice.
;;;
;;;	Copyright:	5-27-94
;;;	Edited:		2-10-2011
;;;
;;;^C^C(c:svlayr)(load"gvpno")(gvpno)(setq mjrg "C" llt "-" colr "2" modf "SYMB")(c:mklayr)(if C:BUBN nil (load"BUBN"))(C:BUBN)(c:rslayr)
;;;
(DEFUN C:BUBN ( / );pt1 pt2 pt3 inss1 inss2 e1ang e2ang
  (setvar "cmdecho" 0)
  (if c:svlayr nil (load "mklayr" "\nFile MKLAYR.LSP not loaded! "))
  (if dimscl nil (load "dimscl" "File DIMSCL.LSP not loaded! "))
  (if gvpno nil (load "gvpno" "File GVPNO.LSP not loaded! "))
  (if upoint nil (load "upoint" "File UPOINT.LSP not loaded! "))
  (c:svlayr)
  (setq mjrg "C" llt "-" colr "2" modf "SYMB")
  (c:mklayr)
  (dimscl)
  (setq pt1 (getpoint "\nCenter of North Arrow ")
        pt1 (list(car pt1)(cadr pt1)(* dimsc 1001))
  );setq
  (if (/=(getvar"viewtwist")0)
    (setq e1ang 0)
    (setq pt3
            (if
              (AND
                (setq rotent(entsel "\nSelect rotated entity to match or Enter to Pick rotation. "))
                (assoc 50 (entget(car rotent)))
              )
              (polar pt1 (+(/ pi 2)(cdr(assoc 50(entget(car rotent)))))1)
              (upoint 1 "" "\nMagnetic North Direction " nil pt1)
            )
          e1ang (*(/(-(angle pt1 pt3)(/ pi 2.0))(* 2.0 pi))360.00)
    );setq
  )
  (graphscr)
  (c:svlayr)
  (gvpno)
  (IF set_mjrg NIL (LOAD "SET_MJRG" "\nFile SET_MJRG.LSP not loaded! "))
  (set_mjrg)
  (setq llt "-"
        colr "1"
        modf "SYMB")
  (c:mklayr)
  (command ".insert" "naro" pt1 dimsc dimsc e1ang)
  (c:rslayr)
  (setvar "cmdecho" 1)
  (command)
);defun c:mgn
